package com.blb.marry.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.blb.marry.entity.Package;
import com.blb.marry.mapper.PackageMapper;
import com.blb.marry.service.PackageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author lvtian
 * @date 2023/1/16 12:41
 */
@Service
public class PackageServiceImpl extends ServiceImpl<PackageMapper, Package> implements PackageService {
    @Autowired
    private PackageMapper packageMapper;
    //通过酒店id查询套餐
    @Override
    public List<Package> getPackageById(Long tbHotelHotelId) {
        List<Package> packages = packageMapper.selectPackageById(tbHotelHotelId);
        return packages;
    }

    //通过packageid查到package信息
    @Override
    public Package getPackageByPackageId(Long packageId) {
        Package aPackage = packageMapper.selectPackageByPackageId(packageId);
        return aPackage;
    }
}
